package vip.sweet.biz.modular.cultural.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.sweet.biz.modular.cultural.params.BizCulturalEventsAddParams;
import vip.sweet.biz.modular.cultural.service.BizCulturalEventsService;
import vip.sweet.common.enums.ResponseEnum;
import vip.sweet.common.response.CommonResponse;

/**
 * @author ASUS
 * @Date 2025/10/5 0:03
 * @Descripition
 */
@RestController
@RequestMapping("/biz/culturalEvents")
@Tag(name = "文化活动控制器")
public class BizCulturalEventsController {
    @Resource
    private BizCulturalEventsService bizCulturalEventsService;
    @PostMapping("/add")
    @Operation(summary = "添加文化活动接口")
    public CommonResponse add(@RequestBody @Validated BizCulturalEventsAddParams addCulturalEventsParams){
        return bizCulturalEventsService.add(addCulturalEventsParams) ? CommonResponse.success("添加成功") : CommonResponse.error(ResponseEnum.ERROR,"添加失败");
    }
}
